package com.clint;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by dty on 2017/6/12.
 */
@Controller
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        return "Hello World";
    }

    @RequestMapping("/test")
    public String index(ModelMap map) {
        System.out.print("111");
        map.addAttribute("host", "http://clintdong.oschina.io/myblog/");
        return "action/welcome";
    }
}
